home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 25 / Cream of the Crop 25.iso / doom / quake_ad.zip / HIPQW.ZIP / SRC / HIP_BRK.QC < prev    next >
Text File  |  1997-01-16  |  2KB  |  93 lines

  1. /* Breakaway walls QuickC program
  2.    By Jim Dose'  9/11/96
  3.    Copyright (c)1996 Hipnotic Interactive, Inc.
  4.    All rights reserved.
  5.    Do not distribute.
  6. */
  7.  
  8. float MULTI_USE = 1;
  9. float INVISIBLE = 2;
  10.  
  11. void() damagethreshold_killed =
  12.     {
  13.     self.health = self.max_health;
  14.  
  15. //   self.solid = SOLID_NOT;
  16.    activator = damage_attacker;
  17.     self.takedamage = DAMAGE_NO;
  18.     SUB_UseTargets ();
  19.     self.takedamage = DAMAGE_YES;
  20.  
  21.     if ( !( self.spawnflags & MULTI_USE ) )
  22.        {
  23.        remove( self );
  24.        }
  25.     };
  26.  
  27. void() damagethreshold_pain =
  28.     {
  29.     self.health = self.max_health;
  30.     };
  31.  
  32. /*QUAKED trigger_damagethreshold (0 .5 .8) ? MULTI_USE INVISIBLE
  33. Triggers only when a threshold of damage is exceeded.
  34. When used in conjunction with func_breakawaywall, allows
  35. walls that may be destroyed with a rocket blast.
  36.  
  37. MULTI_USE tells the trigger to not to remove itself after
  38. being fired.  Allows the trigger to be used multiple times.
  39.  
  40. INVISIBLE tells the trigger to not be visible.
  41.  
  42. "health" specifies how much damage must occur before trigger fires.
  43. Default is 60.
  44.  
  45. */
  46.  
  47. void() trigger_damagethreshold =
  48.  
  49. {
  50.     self.mangle = self.angles;
  51.     self.angles = '0 0 0';
  52.  
  53.     self.classname = "damagethreshold";
  54.    self.solid = SOLID_BSP;
  55.    self.movetype = MOVETYPE_PUSH;
  56.    setorigin (self, self.origin);
  57.     setmodel (self, self.model);
  58.     setsize (self, self.mins , self.maxs);
  59.    if ( self.spawnflags & INVISIBLE )
  60.       {
  61.       self.model = string_null;
  62.       }
  63.  
  64.     if (!self.health)
  65.         {
  66.         self.health = 60;
  67.         }
  68.     self.max_health = self.health;
  69.     self.takedamage = DAMAGE_YES;
  70.  
  71.     self.blocked = SUB_Null;
  72.     self.th_pain = damagethreshold_pain;
  73.     self.th_die  = damagethreshold_killed;
  74.     };
  75.  
  76. /*QUAKED func_breakawaywall (0 .5 .8) ?
  77. Special walltype that removes itself when triggered.
  78. */
  79.  
  80. void() func_breakawaywall =
  81.     {
  82.     self.mangle = self.angles;
  83.     self.angles = '0 0 0';
  84.  
  85.     self.classname = "breakaway";
  86.     self.solid = SOLID_BSP;
  87.     self.movetype = MOVETYPE_PUSH;
  88.     setorigin (self, self.origin);
  89.     setmodel (self, self.model);
  90.     setsize (self, self.mins , self.maxs);
  91.     self.use = SUB_Remove;
  92.     };
  93.